<?php
return array(
	'attributeLabels' => array(
		'ftid' => '类型',
		'worker.worker_name' => '操作人',
		'selectTime' => '创建时间'
	),

	'rules' => array(
		array('fid,ftid,fltid,remark,amount','required'),
	),
	
	'relations' => array(
		'fType' => array(ActiveRecord::BELONGS_TO, 'FinancialType', 'ftid'),
		'account' => array(ActiveRecord::BELONGS_TO, 'FinancialAccount', 'fid'),
		'fLogType' => array(ActiveRecord::BELONGS_TO, 'FinancialLogType', 'fltid'),
		'worker' => array(ActiveRecord::BELONGS_TO, 'WorkerAccount', 'worker_id'),
	),
	
	'behaviors' => array(
		'autoCreate' => array(
			'class' => 'lib.behaviors.auto.CCreateTime',
		),
		'uidResolver' => array(
			'class' => 'application.behaviors.LyAutoIdBehavior',
			'uid' => 'worker_id'
		),
		'userScope' => array(
			'class' => 'coms.behaviors.userScopes.DefaultScope',
			'relatedFields' => array(
				'account.worker_id',
			),
		),
	),
	
	'_import' => array(
		array('*', 'models.ActiveRecord//*'),
	),
);